package org.ehe.erp.domain.quality.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.ehe.common.mybatis.core.domain.BaseEntity2;
import org.ehe.erp.domain.quality.ErpBomQualityItem;
import org.hibernate.validator.constraints.Range;

/**
 * BOM质检项目关联业务对象
 *
 * @author zhangnn
 * @className ErpBomQualityItemBo
 * @description BOM质检项目关联BO，用于业务逻辑处理
 * @date 2025-09-10 15:00:00
 */
@Data
@AutoMapper(target = ErpBomQualityItem.class, reverseConvertGenerate = false)
public class ErpBomQualityItemBo extends BaseEntity2 {

    /** ID */
    private Long id;

    /** BOM ID */
    @NotNull(message = "BOM ID不能为空")
    private Long bomId;

    /** 质检项目ID */
    @NotNull(message = "质检项目ID不能为空")
    private Long qualityItemId;

    /** 是否必检项（0否、1是） */
    @Range(min = 0, max = 1, message = "是否必检项值必须为0或1")
    private Integer isRequired = 1;

    /** 排序 */
    private Integer sort = 0;
}
